<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="author" content="wangbo">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <!-- 垂直居中很难设置 -->
  <style>
    div{
      width: 800px; height: 800px;border: 1px solid red;
      position: relative; top: 0px; left: 0px;
    }
    p{margin: 0px;padding: 0px;width: 100px;height: 100px; position: absolute;}
    .c1{top: 50%;left: 0px;background-color: red; margin-top: -50px;}
    .c2{top: 0px;right: 0px;background-color: greenyellow;}
    .c3{bottom: 0px;left: 0px;background-color: blue;}
    .c4{bottom: 0px;right: 0px;background-color: pink;}
    /* img 图片周围文字的居中方式 vertical-align:middle; top */
  </style>
</head>
<body>
  <div>
    <!-- emmet P.c$*4{我是p$} -->
    <p class="c1">我是p1</p>
    <p class="c2">我是p2</p>
    <p class="c3">我是p3</p>
    <p class="c4">我是p4</p>
  </div>
</body>
</html>